package practice05;

/**
 * @author Administrator
 * @version V1.0
 * @ProjectName:IntelliJ IDEA
 * @PackageName: practice05
 * @ClassName: Rectangle
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @date 2019/12/10 10:09
 * @Copyright 大牛版板所有
 */
public class Rectangle {
    private double length;
    private double width;

    public Rectangle() {
    }

    public Rectangle(double length, double width) {
        this.length = length;
        this.width = width;
    }

    public double getLength() {
        return length;
    }

    public void setLength(double length) {
        this.length = length;
    }

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    public void area(){
        double s;
        s = this.getLength()*this.getWidth();
        System.out.println("矩形的面积为："+s);
    }
}
